package com.quanyan.stadium.api.req;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.collect.Lists;
import com.quanyan.stadium.entity.vo.Evaluate;
import com.quanyan.stadium.entity.vo.EvaluateScore;
import com.quanyan.stadium.entity.vo.RadarEvaluate;
import com.quanyan.stadium.entity.vo.RadarItems;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: zyq
 * Date: 2016/6/23 0023
 * Time: 11:09
 */

public class ReqEvaluateGame implements Serializable{
    public static void main(String[] args) {
        ReqEvaluateGame reqEvaluateGame = new ReqEvaluateGame();
        reqEvaluateGame.setType(2);
        List<EvaluateScore> list = Lists.newArrayList();
        reqEvaluateGame.setEvaluate(list);
        EvaluateScore evaluateScore = new EvaluateScore();
        evaluateScore.setId(15);
        List<RadarEvaluate> radarEvaluates = Lists.newArrayList();

        RadarEvaluate radarEvaluate1 = new RadarEvaluate();
        radarEvaluate1.setCategoryId(1);
        radarEvaluate1.setValue(0.1d);

        RadarEvaluate radarEvaluate2 = new RadarEvaluate();
        radarEvaluate2.setCategoryId(2);
        radarEvaluate2.setValue(0.9d);

        RadarEvaluate radarEvaluate3 = new RadarEvaluate();
        radarEvaluate3.setCategoryId(3);
        radarEvaluate3.setValue(0.9d);

        RadarEvaluate radarEvaluate4 = new RadarEvaluate();
        radarEvaluate4.setCategoryId(4);
        radarEvaluate4.setValue(0.9d);

        RadarEvaluate radarEvaluate5 = new RadarEvaluate();
        radarEvaluate5.setCategoryId(5);
        radarEvaluate5.setValue(0.5d);

        RadarEvaluate radarEvaluate6 = new RadarEvaluate();
        radarEvaluate6.setCategoryId(6);
        radarEvaluate6.setValue(0.6d);

        RadarEvaluate radarEvaluate7 = new RadarEvaluate();
        radarEvaluate7.setCategoryId(7);
        radarEvaluate7.setValue(0.1d);

        radarEvaluates.add(radarEvaluate1);
        radarEvaluates.add(radarEvaluate2);
        radarEvaluates.add(radarEvaluate3);
        radarEvaluates.add(radarEvaluate4);
        radarEvaluates.add(radarEvaluate5);
        radarEvaluates.add(radarEvaluate6);
        radarEvaluates.add(radarEvaluate7);

        evaluateScore.setEvaluateScore(radarEvaluates);
        list.add(evaluateScore);

        ObjectMapper o = new ObjectMapper();
        try {
            System.out.println(o.writeValueAsString(reqEvaluateGame));
        } catch (JsonProcessingException e) {
            e.printStackTrace();
        }

    }

    @NotNull(message = "玩法类型不能为空！")
    private Integer type;
    private List<EvaluateScore> evaluate;
    @NotNull(message = "赛程id不能为空")
    private Integer gameScheduleId;
    private Integer uid;

    public Integer getUid() {
        return uid;
    }

    public void setUid(Integer uid) {
        this.uid = uid;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public List<EvaluateScore> getEvaluate() {
        return evaluate;
    }

    public void setEvaluate(List<EvaluateScore> evaluate) {
        this.evaluate = evaluate;
    }

    public Integer getGameScheduleId() {
        return gameScheduleId;
    }

    public void setGameScheduleId(Integer gameScheduleId) {
        this.gameScheduleId = gameScheduleId;
    }
}
